<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="<s:url value="/css/style.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript"
			src="<s:url value="/js/jquery-1.3.2.min.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.bgiframe.min.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.ajaxQueue.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/thickbox-compressed.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.autocomplete.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/common.js"/>"></script>
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/jquery.autocomplete.css"/>" />
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/thickbox.css"/>" />
		<script type="text/javascript" src="<s:url value="/js/jquery-ui.js"/>"></script>
		<link href="<s:url value="/css/jquery.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript"
			src="<s:url value="/js/jquery.blockUI.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/tableSel.js"/>"></script>
		<script type="text/javascript">
		function dosubmit(){
		    $('#listForm').submit();
		}
		function changedisplay(el){
			el.toggle("fast",function() {
				 //$Container.getContainerProxy().resize();
			});
		}
		$(document).ready(function(){
		    $('#selLastTouchStartTime').datepicker( {dateFormat :'yy-mm-dd'});
		    $('#selLastTouchEndTime').datepicker( {dateFormat :'yy-mm-dd'});
        });
        function doView(id){
			var url = '<s:url value="/customer/TouchHistory/view?leadsId="/>'+id;
			$('#'+id).find('td').attr('class','tablecolour1');
			window.open(url);
		};
		</script>
		<title><s:text name="system.title" />
		</title>
	</head>
	<body>
		<s:include value="/common/up.jsp"></s:include>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="box">
					<s:form action="TouchHistory/list" name="listForm" id="listForm"
						namespace="/customer">
						<input type="hidden" id="startIndex" name="startIndex" value="0" />
						<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="searchbg">
							<tr>
								<td>
								    Name :
									<s:textfield  id="selName"  size="15" name="selName" />
								    Card:
									<s:textfield  id="selCard"  size="15" name="selCard" />
							        Content:
							        <s:textfield  id="selContent"  size="15" name="selContent" />
							        &nbsp;LastTouchTime:
									<s:textfield  id="selLastTouchStartTime" name="selLastTouchStartTime" cssClass="input2" size="10" />-
									<s:textfield  id="selLastTouchEndTime" name="selLastTouchEndTime" cssClass="input2" size="10" /> 
									<img src="<s:url value="/img/right/btns.gif"/>" border="0"  style="cursor:pointer"
										align="absmiddle" onclick="javascript:dosubmit();" />
									<img src="<s:url value="/img/right/btn4.gif"/>" border="0"  style="cursor:pointer"
										align="absmiddle" onclick="javascript:reset2();" />
                 				</td>
							</tr>
						</table>
						<table width="100%" border="0" cellpadding="0" cellspacing="1"
							class="box2">
							<tr>
								<td width="33" class="tablecolour1">
								    &nbsp;
								</td>
								<td class="tablecolour1">
									Name
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									EliteCard
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									TouchTime
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									Comments
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									CC
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									CR
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									Type
								</td>
								<td class="tablecolour1" nowrap="nowrap">
									Function
								</td>
							</tr>
							<s:iterator value="listResult.items" status="status">
								<tr id='<s:property value="id" />'>
									<td class="tablecolour2">
									   <s:property value="#status.index+1" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:property value="leads.name" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:property value="leads.eliteCard" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:date name="dealTime" format="yyyy-MM-dd H:mm"/>
									</td>
									<td class="tablecolour2" >
										<s:property value="comments" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:property value="cc.name" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:property value="cr.name" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<s:property value="eventType" />
									</td>
									<td class="tablecolour2" nowrap="nowrap">
										<a href='javascript:doView(<s:property value="leads.id" />)'>View</a> 
									</td>
								</tr>
							</s:iterator>
						</table>
						<s:include value="/common/page.jsp"></s:include>
					</s:form>
				</td>
			</tr>
		</table>
		<s:include value="/common/down.jsp"></s:include>
	</body>
</html>